#!/usr/bin/env bash
# SPDX-License-Identifier: MulanPSL-2.0+
# Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved.

[[ $CCI_SRC ]] || CCI_SRC=/c/cci

. $CCI_SRC/container/defconfig.sh

load_cci_defaults

service_port=${TASKQUEUE_PORT:-3060}

docker_skip_rebuild "taskqueue-alpine:v0.001-${service_port}"

if [[ ! -f "taskqueue" ]]; then
  $CCI_SRC/container/compile .
else
  echo -e "\n\033[34m- Info: using \033[31mexists\033[34m taskqueue -\033[0m\n"
fi

docker build -t taskqueue-alpine:v0.001-${service_port} .
